Skip to content

net: support krunkit network.mode: shared#1560

Merged
abiosoft merged 2 commits into
abiosoft:mainfrom
acelinkio:feat/sharedNetworkKrunkit
Apr 20, 2026
Merged

net: support krunkit network.mode: shared#1560
abiosoft merged 2 commits into
abiosoft:mainfrom
acelinkio:feat/sharedNetworkKrunkit

Conversation

@acelinkio

Copy link
Copy Markdown
Contributor

This change should help addresses #1559. This change should allow for l2 announcements to work when using tools like metallb, cilium l2 announcements.

both lima & krunkit support socket_vmnet

Verified that the templating adds another interface.

🍎 ❯ grep -A10 "^networks:" ~/.colima/_lima/colima-mtest/lima.yaml
networks:
    - lima: user-v2
    - socket: /Users/ep/.colima/mtest/daemon/vmnet.sock
      interface: col0
      metric: 300
provision:
    - mode: system
      script: sysctl -w fs.inotify.max_user_watches=1048576
    - mode: system
      script: grep '127.0.0.1 colima-mtest' /etc/hosts || echo '127.0.0.1 colima-mtest' >> /etc/hosts
    - mode: system

Will test tomorrow with finishing up a Kubernetes cluster and seeing if the L2 announcements work as expected.

One step closer to having gpu accelerated pods running in Kubernetes!

Signed-off-by: Arlan Lloyd <arlanlloyd@gmail.com>
@acelinkio

Copy link
Copy Markdown
Contributor Author

Confirmed that network.mode: shared works following this change. I was able to successfully use L2Annoucements in my Kubernetes cluster without issue.

Thanks again for this project! Next item to start testing is if I can get a GPU accelerated pod running in Kubernetes.

@acelinkio

acelinkio commented Apr 19, 2026

Copy link
Copy Markdown
Contributor Author

I think this PR can be merged. Verified functionality of network and GPU passthru. Going to dump some of my progress here.

I was able to get the GPU Pass Thru following the same demo code here https://github.com/medyagh/ai-playground-minikube/tree/main/macos with one small change.

squat/generic-device-plugin image tag was not specified so its pulling a newer version to create that container. That version uses devic.es/dri: 1 instead of squat.ai/dri: 1 for devices.

🍎 ❯ kubectl exec pod/uvkc-gpu -it -- /uvkc/mad_throughput
2026-04-18T15:58:20+00:00
Running /uvkc/mad_throughput
Run on (4 X 48 MHz CPU s)
Load Average: 2.19, 0.78, 0.47
-----------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                                                               Time             CPU   Iterations UserCounters...
-----------------------------------------------------------------------------------------------------------------------------------------
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f32/1048576/100000/manual_time      511694 us         2334 us            1 FLOps=4.09845T/s
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f32/1048576/200000/manual_time     1022130 us         4107 us            1 FLOps=4.10349T/s
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f16/1048576/100000/manual_time      280612 us         1820 us            3 FLOps=7.4735T/s
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f16/1048576/200000/manual_time      558286 us         2800 us            1 FLOps=7.51282T/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f32/1048576/100000/manual_time   22940306 us         27.6 us            1 FLOps=91.4178G/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f32/1048576/200000/manual_time   45849904 us         23.7 us            1 FLOps=91.479G/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f16/1048576/100000/manual_time   72468475 us         23.0 us            1 FLOps=28.9388G/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f16/1048576/200000/manual_time  368624292 us         87.0 us            1 FLOps=11.3783G/s

However when I go to use the ghcr.io/ggml-org/llama.cpp:light-vulkan image to run a model I am getting

root@llama-server-7988bcff84-p9l4t:/app# ./llama-cli -ngl 99
load_backend: loaded CPU backend from /app/libggml-cpu-armv8.2_2.so
warning: no usable GPU found, --gpu-layers option will be ignored
warning: one possible reason is that llama.cpp was compiled without GPU support
warning: consult docs/build.md for compilation instructions
error: --model is required
root@llama-server-7988bcff84-p9l4t:/app# ./llama-cli --list-devices
load_backend: loaded CPU backend from /app/libggml-cpu-armv8.2_2.so
Available devices:
root@llama-server-7988bcff84-p9l4t:/app# apt-get update && apt-get install -y vulkan-tools
...
...
...
root@llama-server-7988bcff84-p9l4t:/app# vulkaninfo
ERROR at ./vulkaninfo/./vulkaninfo.h:613:vkCreateInstance failed with ERROR_OUT_OF_HOST_MEMORY

still troubleshooting, but that is unrelated to this PR.

EDIT:
GPU PassThru working with
macos -> colima -> krunit -> k3s/containerd -> pod. issue was with the container image. Use quay.io/ramalama/ramalama:0.19

@abiosoft

Copy link
Copy Markdown
Owner

This was actually an oversight from me.
Thanks :)

@abiosoft abiosoft merged commit 156799f into abiosoft:main Apr 20, 2026
11 of 12 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 10, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [abiosoft/colima](https://github.com/abiosoft/colima) | patch | `v0.10.1` → `v0.10.3` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>abiosoft/colima (abiosoft/colima)</summary>

### [`v0.10.3`](https://github.com/abiosoft/colima/releases/tag/v0.10.3)

[Compare Source](abiosoft/colima@v0.10.2...v0.10.3)

#### Highlights

This is an hotfix release to address a regression for Kubernetes runtime.

#### Commits

- k3s: fix restart failure due to rsync by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1582](abiosoft/colima#1582)

**Full Changelog**: <abiosoft/colima@v0.10.2...v0.10.3>

### [`v0.10.2`](https://github.com/abiosoft/colima/releases/tag/v0.10.2)

[Compare Source](abiosoft/colima@v0.10.1...v0.10.2)

#### Highlights

This is an incremental stability release with bug fixes and features.

##### Updates

- New `--downloader` flag to retain curl for downloads. Supports `curl` or `native` (default).
- Force stop with `colima stop --force` no longer attempts to stop the container runtime before stopping VM.
- Support for user-provided containerd and buildkit config for the Containerd runtime.
- Nested virtualization is now supported with `krunkit` vm type.
- Soft delete (i.e. `colima delete` without `--force`) is now properly supported on Incus runtime, and container data would be auto-restored on recreation.
- Cache directory can now be customized with the `COLIMA_CACHE_HOME` environment variable. The cache directory stores the downloaded assets used by Colima.
- Network address is now supported for the `krunkit` vm type.
- Runtime is now displayed in `colima list` for stopped instances.
- Custom generated disk images can now be used by setting the `--force-disk-image` flag in addition to `--disk-image` flag. The image must be a debian based distro with systemd. ***Note that this is for power users and not officially supported***.

##### Runtime version bumps

**NOTE:** container runtime versions can be updated manually by running the `colima update` command.

- Docker version updated to `v29.5.2`
- Nerdctl version updated to `v2.3.1`
- Incus version updated to `v7.1`

#### Commits

- core: provide optional curl downloader. by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1519](abiosoft/colima#1519)
- chore: clean up file downloader by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1520](abiosoft/colima#1520)
- core: rework apple silicon device detection by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1526](abiosoft/colima#1526)
- core: refactor container stop logic to support forced shutdown by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1527](abiosoft/colima#1527)
- build(deps): bump actions/download-artifact from 7.0.0 to 8.0.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1528](abiosoft/colima#1528)
- build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1529](abiosoft/colima#1529)
- build(deps): bump actions/setup-go from 6.2.0 to 6.3.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1530](abiosoft/colima#1530)
- containerd: support user-provided containerd and buildkit config by [@&#8203;citadelgrad](https://github.com/citadelgrad) in [#&#8203;1523](abiosoft/colima#1523)
- vm: enable nested virtualization for krunkit by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1531](abiosoft/colima#1531)
- docs: add VM customization and update guide to FAQ by [@&#8203;citadelgrad](https://github.com/citadelgrad) in [#&#8203;1522](abiosoft/colima#1522)
- core: rework host to guest file movements. by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1538](abiosoft/colima#1538)
- Incus: support full restore after soft-delete by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1540](abiosoft/colima#1540)
- build(deps): bump golang.org/x/term from 0.40.0 to 0.41.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1541](abiosoft/colima#1541)
- core: make cache directory configurable by [@&#8203;reillylm](https://github.com/reillylm) in [#&#8203;1537](abiosoft/colima#1537)
- build(deps): bump actions/download-artifact from 8.0.0 to 8.0.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1544](abiosoft/colima#1544)
- build(deps): bump github.com/fatih/color from 1.18.0 to 1.19.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1546](abiosoft/colima#1546)
- build(deps): bump actions/setup-go from 6.3.0 to 6.4.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1548](abiosoft/colima#1548)
- core: update disk images by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1554](abiosoft/colima#1554)
- docs: update krunkit installation to reference upstream by [@&#8203;acelinkio](https://github.com/acelinkio) in [#&#8203;1562](abiosoft/colima#1562)
- net: support krunkit network.mode: shared by [@&#8203;acelinkio](https://github.com/acelinkio) in [#&#8203;1560](abiosoft/colima#1560)
- build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1558](abiosoft/colima#1558)
- build(deps): bump golang.org/x/term from 0.41.0 to 0.42.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1555](abiosoft/colima#1555)
- core: update disk images by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1566](abiosoft/colima#1566)
- chore: fix regression in terminal output by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1567](abiosoft/colima#1567)
- build(deps): bump golang.org/x/term from 0.42.0 to 0.43.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1568](abiosoft/colima#1568)
- vm: update disk mount script by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1571](abiosoft/colima#1571)
- cli: show runtime for stopped instances in list output by [@&#8203;mschoenlaub](https://github.com/mschoenlaub) in [#&#8203;1574](abiosoft/colima#1574)
- vm: allow use of unsupported disk images by [@&#8203;h0tw1r3](https://github.com/h0tw1r3) in [#&#8203;1576](abiosoft/colima#1576)
- build(deps): bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1573](abiosoft/colima#1573)
- build(deps): bump actions/checkout from 6.0.2 to 6.0.3 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1578](abiosoft/colima#1578)
- chore: minor fixes by [@&#8203;abiosoft](https://github.com/abiosoft) in [#&#8203;1579](abiosoft/colima#1579)

#### New Contributors

- [@&#8203;citadelgrad](https://github.com/citadelgrad) made their first contribution in [#&#8203;1523](abiosoft/colima#1523)
- [@&#8203;reillylm](https://github.com/reillylm) made their first contribution in [#&#8203;1537](abiosoft/colima#1537)
- [@&#8203;acelinkio](https://github.com/acelinkio) made their first contribution in [#&#8203;1562](abiosoft/colima#1562)
- [@&#8203;mschoenlaub](https://github.com/mschoenlaub) made their first contribution in [#&#8203;1574](abiosoft/colima#1574)
- [@&#8203;h0tw1r3](https://github.com/h0tw1r3) made their first contribution in [#&#8203;1576](abiosoft/colima#1576)

**Full Changelog**: <abiosoft/colima@v0.10.1...v0.10.2>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTEuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants